package br.edu.univas.es2012.controller;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

import br.edu.univas.es2012.model.DAOException;

public class ConnectionBanco {
	public static Connection getConnection()throws DAOException{
		Connection conn = null;
		try{
			Class.forName("org.postgresql.Driver");
			conn = DriverManager.getConnection("jdbc:postgresql://localhost:5432/gerenciaodontologia","postgres","flavio");
		}catch(ClassNotFoundException e){
			e.printStackTrace();
		}catch(SQLException e){
			e.printStackTrace();
		}
		return conn;
	}

}
